Skip to main content

All Questions

2votes
2answers
562views

Is this architecture overkill? What is a good way to architect this software?

I have an algorithm I am trying to implement that has steps 1 to 5. There are several different ways I could implement each step. Each calculation step is essentially just an astronomy calculation, ...
Hunter's user avatar
2votes
1answer
160views

The notion of configurable strategies

I'm designing an algorithm that matches entries based on some notion of "proximity" (for the sake of discussion, assume we're matching floats). Furthermore: The input is a scalar and a ...
Dev-iL's user avatar
-1votes
1answer
60views

Preventing name collision between user-defined modules within a framework

I'm a contributor to a framework that's designed for producing synthetic data. The system allows the end-user to create custom data generators and load them into the framework. Currently we store the ...
user avatar
4votes
2answers
4kviews

What's wrong with using a Singleton?

I'm working on a Python application in which there are two Singleton classes: App and Configuration. The former seems straight forward, only ever instantiate one App instance; the latter seems ...
pstatix's user avatar
  • 1,047
2votes
1answer
534views

Python: Return or update object

Firstly I am new to Software Engineering and my last question was closed. I am doing my best to ask relevant questions and improve. If you are going to down vote my question I'd really appreciate if ...
user7692855's user avatar
1vote
0answers
80views

Architecture Design of Command&Control application center for displays

I am facing dilemma on how to best design the following functionality. What design patterns and OOD principles should I use. For simplicity sake following are basic requirements: displays type can ...
coderock's user avatar
1vote
2answers
293views

Should there not be methods intended to be only called from inside of the package, but from the outside of the class they're defined in?

Note: This is a follow-up to this question on StackOverflow. I have to write a wrapper in Python to an external API, accessible through HTTP. The code is supposed to be publicly available on GitHub. ...
gaazkam's user avatar
  • 4,519
7votes
2answers
12kviews

Design pattern for similar classes that require different implementations

Edited: Update is at the bottom There could be a common or best practice for this scenario, but I am unfamiliar with it. However, it could very easily be a matter of subjective opinion on how one ...
pstatix's user avatar
  • 1,047
0votes
1answer
63views

Method grouping other methods of the same family and how to call any of these separately

Worse title ever but I don't really know how to describe my scenario in a line... So I have a method that wraps the calls of a many methods of the same nature. Once any of these methods have finished,...
dabadaba's user avatar
5votes
1answer
305views

In more canonical OO Python situations, what is the rule of thumb for default access modifiers?

Generally speaking in canonical OOP situations, the rule of thumb is to write your classes with the least access as necessary. i.e. only make public only what is necessary, make protected only what is ...
Trevor Boyd Smith's user avatar
-1votes
2answers
205views

Creating instances of an ability when there are multiple different type of abilities

I'm creating an RPG game where a player has a set of skills, each of which he can level up to improve its effect. Here are two example skills: health: increase player's maximum health regeneration: ...
Mahi's user avatar
  • 406
1vote
3answers
2kviews

How To Extend Parent Methods in Children Classes?

There is a parent class with a method which many children use but many children extend the method, what is the best way to extend it without violating DRY? Here are my 2 current solutions: 1: The ...
Will Beauchamp's user avatar
1vote
2answers
848views

How should I structure these Python classes?

Base Class I have a class called Remote. This class represents a remote machine and has properties such as ip, hostname, username, and password, as well as methods for transferring files to/from the ...
ArtOfWarfare's user avatar
1vote
1answer
328views

Adding new functionality to all of shelve.Shelf's subclasses in Python

In order to avoid the overhead associated with the shelve module's writeback option I'm interested in putting together a shelf class that only accepts hashable values, with hashability being a proxy ...
kuzzooroo's user avatar
0votes
3answers
2kviews

Object design where hard-coded values are used to instantiate objects?

I'm creating the design for a browser bookmark merging program and I've ran into a design problem that I've seen before yet I've never come up with a good solution for it. So lets say I have a ...
Korey Hinton's user avatar

153050per page
close